<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"></c:set>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>查询页面</title>
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css">
    <style>
        body{width: 1050px;margin:0 auto;}
        form,table{width:1050px;margin-left:50px;padding-left:30px;}
        button{margin-left: 100px;}

    </style>
    <link rel="stylesheet" href="${ctx}/static/layui-v2.3.0/layui/css/layui.css">
</head>
<body style="margin: 0 auto;">
<form action="${ctx}/pk/saveMatchPk" method="post"  class="layui-form" style="margin-top: 30px;">
    <div class="layui-form-item">
        <label class="layui-form-label">选手1</label>
        <div class="layui-input-block">
            <select name="firstPlayerId" id="firstPlayerId" lay-verify="required">
                <option></option>
                <c:forEach items="${playerList}" var="player" varStatus="stat">
                    <option value="${player.playerId}">${player.playerName}</option>
                </c:forEach>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">歌曲名</label>
        <div class="layui-input-block">
            <input type="text" name="firstSongName" required  lay-verify="required" placeholder="请输入歌曲名" autocomplete="off" class="layui-input">

            <input type="text" name="battleId" value="4009" required  lay-verify="required"  autocomplete="off" class="layui-input">
            <input type="text" name="firstTicketCount" value="4009" class="layui-input">
            <input type="text" name="firstNeedScore" value="4009" class="layui-input">
            <input type="text" name="firstScore" value="4009" class="layui-input">
            <input type="text" name="secondTicketCount" value="4009" class="layui-input">
            <input type="text" name="secondNeedScore" value="4009" class="layui-input">
            <input type="text" name="secondScore" value="4009" class="layui-input">
            <input type="text" name="battleFlag" value="4009" class="layui-input">

        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">比赛名称</label>
        <div class="layui-input-block">
            <select name="matchId" id="matchId" lay-verify="required">
                <option></option>
                <c:forEach items="${matchList}" var="match" varStatus="stat">
                    <option value="${match.matchId}">${match.matchName}</option>
                </c:forEach>
            </select>
        </div>
    </div><br>
    <div class="layui-form-item" >
        <label class="layui-form-label">选手2</label>
        <div class="layui-input-block">
            <select name="secondPlayerId" id="secondPlayerId" lay-verify="required">
                <option></option>
                <c:forEach items="${playerList}" var="player" varStatus="stat">
                    <option value="${player.playerId}">${player.playerName}</option>
                </c:forEach>
            </select>
        </div>
    </div>
    <div class="layui-form-item" >
        <label class="layui-form-label">歌曲名</label>
        <div class="layui-input-block">
            <input type="text" name="secondSongName" required  lay-verify="required" placeholder="请输入歌曲名" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-input-block" >
        <button class="layui-btn" lay-submit="" lay-filter="demo1" type="submit">提交</button>
        <a href="${ctx}/pk/selectMatchPk" class="layui-btn">返回</a>
    </div>

</form>


</table>
<script type="text/javascript" src="${ctx}/static/layui-v2.3.0/layui/layui.js"></script>
<script>
    //Demo
    layui.use(['form', 'laydate'], function(){
        var form = layui.form
            ,layer = layui.layer
            ,laydate = layui.laydate;

        //日期
        laydate.render({
            elem: '#date'
        });
        //监听提交
        form.on('submit(formDemo)', function(data){
            layer.msg(JSON.stringify(data.field));
            return false;
        });

    });
</script>

</body>
</html>